/**
**************************************************************************************
*Palisma - Secrets of the Illuminati is an open-source 2D RPG                        *
*Copyright (C) 2006, Tony Sparks                                                     *
*                                                                                    *
*This library is free software; you can redistribute it and/or                       *
*modify it under the terms of the GNU Lesser General Public                          *
*License as published by the Free Software Foundation; either                        *
*version 2.1 of the License, or (at your option) any later version.                  *
*                                                                                    *
*This library is distributed in the hope that it will be useful,                     *
*but WITHOUT ANY WARRANTY; without even the implied warranty of                      *
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                   *
*Lesser General Public License for more details.                                     *
*                                                                                    *
*You should have received a copy of the GNU Lesser General Public                    *
*License along with this library; if not, write to the Free Software                 *
*Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA      *
**************************************************************************************
*/
#pragma once

#include "../IGameState.h"
class IRender;
class ICamera;

/*-----------------------------------------
    ZOrder
------------------------------------------*/
enum {
    ZBOTTOM_MOST = 0,
    ZMIDDLE = 50,
    ZTOP_MOST = 100
};

/**
================================
A GameStateView is the visual representation
of a current gamestate, there may be multiple
gamestates active at once, eg. Console and IngameState
================================
*/
class IGameStateView
{
public:
    IGameStateView() { m_id = 0; m_zOrder = ZBOTTOM_MOST; m_active = false; m_state = NULL; };

    /** Register the state that goes with this view */
    virtual void RegisterState( IGameState* g ) { m_state = g; };
    /** Render this view */
    virtual void Render( IRender *r, ICamera* cam )=0;
    
    /** Set the id */
    void SetID( int i ) { m_id = i; };
    /** Get the ID */
    int  GetID() { return m_id; };

    /** Make this an active view */
    void SetActive(bool b) { m_active = b; };
    /** Test activity */
    bool IsActive() { return m_active; };

    /** Get the ZOrder */
    int GetZOrder() { return m_zOrder; };
    /** SEt the zoder */
    void SetZOrder( int z ) { m_zOrder = z; };

private:
    int     m_id;
    bool    m_active;
    // zorder
    int     m_zOrder;
protected:
    // state representation
    IGameState*     m_state;

};